package com.jiecao.news.jiecaonews.util.umeng;

import android.content.Context;
import com.umeng.socialize.controller.UMSocialService;
import com.umeng.socialize.media.UMImage;
import com.umeng.socialize.sso.SinaSsoHandler;

public class ShareUtils {

	/**
	 * @功能描述 : 添加微信he sina平台分享
	 * type:1 weixi 2:sina
	 * @return
	 */
	public static void initshare( Context context,
			UMImage mUMImgBitmap, String contentUrl, UMSocialService controller,String title) {
		
	  
//		controller.getConfig().setSinaSsoHandler(new SinaSsoHandler());
	    controller.getConfig().setSsoHandler(new SinaSsoHandler());
		String appId = "wxaa8a85d8a34b3fc6";
		controller.getConfig().supportWXPlatform(context, appId, contentUrl);
		mUMImgBitmap.setTitle(title);
		mUMImgBitmap.setTargetUrl(contentUrl);
		controller.setShareMedia(mUMImgBitmap);
		controller.getConfig().supportWXCirclePlatform(context, appId,
				contentUrl);
	}

}
